<!--
 * @Author: xiaxia
 * @Description: 
 * @Date: 2024-06-20 10:13:27
 * @LastEditTime: 2024-07-17 11:49:04
 * @FilePath: \project\src\views\home\index.vue
-->
<template>
  <el-card>
    <div class="box">
      <img :src="userStore.avatar" alt="" class="avatar">
      <div>
        <h1 class="title">{{ nowTime }}好{{ userStore.username }}</h1>
        <span>欢迎来到门的世界</span>
      </div>
    </div>
  </el-card>
  <div class="welcome">
    <svg-icon name="welcome" width="600px" height="600px"></svg-icon>
  </div>
</template>

<script lang="ts" setup>
import useUserStore from '@/store/modules/user'
import { getLoginTime } from '@/utils/tiem'

let userStore = useUserStore()
let nowTime = getLoginTime()
</script>

<style lang="scss" scoped>
.box{
  display: flex;
  align-items: center;
  .avatar{
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
  }

  .title{
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
  }
  span {
    color: #c6c6c6;
    font-style: italic;
  }
}

.welcome{
  display: flex;
  justify-content: center;
}
</style>